﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WaterLevelByDate.aspx.cs" Inherits="GroundWater.waterlevel.WaterLevelByDate" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../ext.css" type="text/css" rel="Stylesheet" />
    
    <script language="javascript" src="../js/common.js" type="text/javascript"></script>
    <script language="javascript" src="../js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    
    <link media=all href="../js/resources/_Common/Common.css" type=text/css rel=stylesheet>
    <link media=all href="../js/resources/_Loadding/Loadding.css" type=text/css rel=stylesheet>
    <link media=all href="../js/resources/_Panel/Panel.css" type=text/css rel=stylesheet>
    <link media=all href="../js/resources/_Button/Button.css" type=text/css rel=stylesheet>
    <link media=all href="../js/resources/_TextBox/TextBox.css" type=text/css rel=stylesheet>
    
   

</head>
<body>
    <form id="form1" runat="server"><asp:ScriptManager ID="scriptManager" runat="server" />
    <!-- 面板内容 -->
<div id=bodyPanel style=" width:98%; margin-right:8px; margin-bottom:2px;">
<div class=x-pne id=panel style="WIDTH: 100%;">
    <div class="corner-bg x-pne-lt x-pne-left">
    <div class="corner-bg x-pne-rt x-pne-right">
    <div class="corner-bg x-pne-t">
    <div class="x-pne-caption font">查询条件</div>
    </div>
    </div>
    </div>
    
    <div>
    <div class="side-bg x-pne-l">
    <div class="side-bg x-pne-r">
    <div class="x-pne-c" style="WIDTH: 100%; HEIGHT: 66px">
    <div id="contentPanel"><!-- 控件实例 -->

    <div class="gbPanel"><%--onselectedindexchanged="drpWell_SelectedIndexChanged"--%>
        <table class="font">
        <tbody>
        <tr>
            <td>水井:</td><td><asp:DropDownList ID="drpWell" runat="server" 
                DataSourceID="odsWells" DataTextField="Name" DataValueField="Code"   
                EnableViewState="false" OnSelectedIndexChanged="drpWell_SelectedIndexChanged" 
                AutoPostBack="true" ondatabound="drpWell_DataBound" ></asp:DropDownList></td>
            <td>日期从:</td><td colspan="5"><input class="textField text-bg border-blur" id="txtStartDate"  type="text" style="width:76px;" maxlength="16" runat="server" />&nbsp;<img onclick="WdatePicker({el:$dp.$('txtStartDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;到:<input class="textField text-bg border-blur" id="txtEndDate"  type="text" style="width:76px;" maxlength="16" runat="server"/>&nbsp;<img onclick="WdatePicker({el:$dp.$('txtEndDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" />
            </td>
            </tr>
            
            <tr>
            
            <td>图高：</td><td><input class="textField text-bg border-blur" id="txtHeight" type="text" value="322" maxlength="16" style="width:76px;" runat="server" /></td>
            <td>图宽：</td><td><input class="textField text-bg border-blur" id="txtWidth"  type="text" value="700" maxlength="16" style="width:76px;" runat="server" /></td>
            <%--
            <td>图表类型：</td><td><asp:DropDownList ID="drpChartType" runat="server" onselectedindexchanged="drpChartType_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem Value="Line" Text="折线" Selected="True"></asp:ListItem><asp:ListItem Value="Spline" Text="曲线"></asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="drp3D" runat="server" onselectedindexchanged="drp3D_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem Value="0" Text="2D" Selected="True"></asp:ListItem><asp:ListItem Value="1" Text="3D"></asp:ListItem>
            </asp:DropDownList></td>
            --%>
            <td>最大顶点数:</td><td><input class="textField text-bg border-blur" id="txtMarker" value="31"  type="text" style="width:76px;" maxlength="16" runat="server" /></td>
            <td style="padding-left:20px;">
                <div>
                    <div class="btn-side btn-bg" style="background-position: 0% 0%"></div>
                    <div class="btn-body btn-bg" style="background-position: 0px 168px; WIDTH: 60px"><asp:Button ID="btnQuery" runat="server" Text="生成图表" CssClass="font" onclick="btnQuery_Click" OnClientClick="return validate();" /></div>  <%--<button id="btnQuery" name="btnQuery" class=font type=button runat="server" onclick="__doPostBack(this, null);">查　询</button>--%>
                    <div class="btn-side btn-bg" style="background-position: 0px 189px"></div>
                </div>
            </td>
            <td style="padding-left:10px;">
                <div>
                    <div class="btn-side btn-bg" style="background-position: 0% 0%"></div>
                    <div class="btn-body btn-bg" style="background-position: 0px 168px; WIDTH: 60px"><asp:Button ID="btnOK" runat="server" Text="  导出  " CssClass="font"  OnClientClick="if(!isDate(txtStartDate) || !isDate(txtEndDate)) { alert('日期格式不正确！'); return false; }" /></div>  <%-- OnClick="btnExport_Click"<button id="btnQuery" name="btnQuery" class=font type=button runat="server" onclick="__doPostBack(this, null);">查　询</button>--%>
                    <div class="btn-side btn-bg" style="background-position: 0px 189px"></div>
                </div>
            </td>
        </tr>
        </tbody>
        </table>
    </div>

    </div>
    </div>
    </div>
    </div>
    <div class="corner-bg x-pne-lb x-pne-left">
        <div class="corner-bg x-pne-rb x-pne-right">
            <div class="corner-bg x-pne-b"></div>
        </div>
    </div>
    </div>
</div>
</div>
<asp:ObjectDataSource ID="odsWells" runat="server" SelectMethod="GetAllWithCode" TypeName="GroundWater.BusinessActions.Well" >
   <%-- <SelectParameters>
        <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="enableCache" Type="Boolean" DefaultValue="True" />
    </SelectParameters>--%>
</asp:ObjectDataSource>

<!-- 面板内容结束 -->

<%--<asp:CHART id="WaterLevelChart" runat="server" Palette="BrightPastel" BackColor="#D3DFF0" Width="612px" Height="396px" ImageLocation="~/TempImageFiles/ChartPic_#SEQ(300,3)" ImageType="Png" BorderDashStyle="Solid" BackSecondaryColor="White" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105">
    <titles>
		<asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3" Text="水位图表" Name="Title1" ForeColor="26, 59, 105"></asp:Title>
	</titles>
	<legends>
		<asp:Legend Enabled="False" IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"></asp:Legend>
	</legends>
	<borderskin SkinStyle="Emboss"></borderskin>
	<series>
		<asp:Series Name="Series1" XValueType="Double" YValueType="Double" ChartType="Line" BorderColor="180, 26, 59, 105" ></asp:Series>
	</series>
	<chartareas>
		<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
			<area3dstyle Rotation="9" Perspective="10" Enable3D="False" LightStyle="Realistic" Inclination="38" PointDepth="200" IsRightAngleAxes="False" WallWidth="0" IsClustered="False" />
			<position Y="2" Height="94" Width="94" X="2"></position>
			<axisy LineColor="64, 64, 64, 64">
				<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
				<MajorGrid LineColor="64, 64, 64, 64" />
			</axisy>
			<axisx LineColor="64, 64, 64, 64">
				<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
				<MajorGrid LineColor="64, 64, 64, 64" />
			</axisx>
		</asp:ChartArea>
	</chartareas>
</asp:CHART>--%>

<asp:CHART id="WaterLevelChart" runat="server" Palette="BrightPastel" BackColor="#D3DFF0" ImageType="Png" Width="700px" Height="322px" BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105">
    <titles>
		<asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3" Text="水位图表" Name="Title1" ForeColor="26, 59, 105"></asp:Title>
	</titles>
	<legends>
		<asp:Legend Enabled="False" IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"></asp:Legend>
	</legends>
	<borderskin SkinStyle="Emboss"></borderskin>
	<series>
		<%--<asp:Series MarkerSize="9" BorderWidth="3" XValueType="Double" Name="Series1" ChartType="Line" MarkerStyle="Diamond" ShadowColor="Black" BorderColor="180, 26, 59, 105" Color="220, 224, 64, 10" ShadowOffset="2" YValueType="Double"></asp:Series>--%>
		<asp:Series MarkerSize="8" BorderWidth="3" XValueType="Double" Name="Series1" ChartType="Line" MarkerStyle="Circle" ShadowColor="Black" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" ShadowOffset="2" YValueType="Double"></asp:Series>
	</series>
	<chartareas>
		<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
			<area3dstyle Rotation="25" Perspective="9" LightStyle="Realistic" Inclination="40" IsRightAngleAxes="False" WallWidth="3" IsClustered="False" />
			<axisy LineColor="64, 64, 64, 64" >
				<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
				<MajorGrid LineColor="64, 64, 64, 64" />
			</axisy>
			<axisx LineColor="64, 64, 64, 64"  IsLabelAutoFit="false"  >
				<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" Interval="1" />
				<MajorGrid LineColor="64, 64, 64, 64" Interval="1" />
			</axisx>
		</asp:ChartArea>
	</chartareas>
</asp:CHART>


	<div style="margin-left:36px; margin-top:10px;">
        <input type="button" id="btnColumn" name="btnColumn" value="水位柱状图" />
        <input type="button" id="btnWaterlevel" name="btnWaterlevel" value="水位信息" />
        <input type="button" id="btnWell" name="btnWell" value="水井信息" />
    </div>
    </form>
    
    <script type="text/javascript">
        //<![CDATA[
        Sys.Application.add_init(applicationInitHandler);
        function applicationInitHandler() {
            Sys.UI.DomEvent.addHandler($get("btnColumn"), "click", function() {
                var drpWell = jQuery("#drpWell")[0];
                var id = drpWell.options[drpWell.selectedIndex].value;
                window.location = "waterlevelchart.aspx?id=" + id;
            });
            Sys.UI.DomEvent.addHandler($get("btnWaterlevel"), "click", function() {
                var drpWell = jQuery("#drpWell")[0];
                var id = drpWell.options[drpWell.selectedIndex].value;
                window.location = "monitoringquery.aspx?id=" + id;
            });
            Sys.UI.DomEvent.addHandler($get("btnWell"), "click", function() {
                var drpWell = jQuery("#drpWell")[0];
                var id = drpWell.options[drpWell.selectedIndex].value;
                window.location = "../Basedata/WellView.aspx?id=" + id;
            });

            if (window.parent) {
                var title = window.parent.document.getElementById("contentTitle");
                if (title) {
                    title.innerText = "水位曲线图";
                }
            }
        }
        
        
        function validate() {
            if (!isDate(document.getElementById('txtStartDate')) || !isDate(document.getElementById('txtEndDate'))) {
                alert('日期格式不正确！');
                return false;
            }
            if (!isInteger(document.getElementById('txtMarker').value)) {
                alert('最大顶点数必须为正整数！');
                return false;
            }

            if (!isNum(document.getElementById('txtHeight').value)) {
                alert('图片高度必须为数值类型！');
                return false;
            }

            if (!isNum(document.getElementById('txtWidth').value)) {
                alert('图片宽度必须为数值类型！');
                return false;
            }
            
        }
        
//]]>
    </script>
    
    <asp:Literal ID="lblJavaScript" EnableViewState="false" runat="server"></asp:Literal>
</body>
</html>
